﻿<div ng-controller="declarationController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li><a ui-sref="app.declaration.list">商户入驻资料</a></li>
                <li class="active" ng-bind="breadcrumb"></li>
            </ol>
        </div>
    </div>
    <div class="form-horizontal">
        <div class="row">
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading">基本信息</div>
                    <div class="panel-body">
                        <form name="_form" class="form-horizontal w5c-form" w5c-form-validate="model.validateOptions" role="form" novalidate>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-3 control-label">姓名：</label>
                                <div class="col-sm-9">
                                    <input type="text" name="name" class="form-control input-sm" ng-model="model.name" required ng-disabled="action == 'audit'">
                                </div>
                            </div>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-3 control-label">手机账户：</label>
                                <!--<div class="col-sm-3">
            <input type="text" name="mobile_code " class="form-control input-sm" ng-model="model.mobile_code" required>
            <select class="form-control input-sm" name="disabled" ng-model="model.mobile_code">
                <option value="">886</option>
                <option value="0">1000</option>
                <option value="1">10000</option>
                <option value="2">100000</option>
            </select>
        </div>-->
                                <div class="col-sm-3">
                                    <select class="form-control input-sm" ng-model="model.mobile_code" ng-options="item for item in code" ng-disabled="action == 'audit'"></select>
                                </div>
                                <div class="col-sm-6">
                                    <input type="text" name="mobile" class="form-control input-sm" ng-model="model.mobile" required  ng-disabled="action == 'audit'">
                                </div>
                            </div>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-3 control-label">国家/地区：</label>
                                <div class="col-sm-9">
                                    <input type="text" name="country" class="form-control input-sm" ng-model="model.country" ng-disabled="action == 'audit'">
                                </div>
                            </div>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-3 control-label">企业类型：</label>
                                <div class="col-sm-9">
                                    <select class="form-control input-sm" name="disabled" ng-model="model.company_type" ng-disabled="action == 'audit'">
                                        <option value="">请选择企业类型</option>
                                        <option value="0">全部</option>
                                        <option value="1">贸易</option>
                                        <option value="2">销售</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-3 control-label">企业名称：</label>
                                <div class="col-sm-9">
                                    <input type="text" name="company_name" class="form-control input-sm" ng-model="model.company_name" ng-disabled="action == 'audit'">
                                </div>
                            </div>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-3 control-label">分配集散中心：</label>
                                <div class="col-sm-9">
                                    <ui-select ng-model="model.entrepot_id" theme="bootstrap">
                                        <ui-select-match placeholder="选择集散中心">{{$select.selected.entrepot_name}}</ui-select-match>
                                        <ui-select-choices repeat="item.id as item in entrepot | propsFilter: {entrepot_name: $select.search}">
                                            <div>{{item.entrepot_name}}</div>
                                        </ui-select-choices>
                                    </ui-select>
                                </div>
                            </div>
                            <div class="form-group form-group-sm" ng-show="action == 'audit'">
                                <label class="col-sm-3 control-label">审核状态：</label>
                                <div class="col-sm-9">
                                    <select class="form-control input-sm" name="disabled" ng-model="model.auth_status  ">
                                        <option value="">请选择商户审核状态</option>
                                        <option value="0">待缴费</option>
                                        <option value="1">待审核</option>
                                        <option value="2">审核通过</option>
                                        <option value="3">审核不通过</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group form-group-sm">
                                <label class="col-sm-2 control-label"></label>
                                <div class="col-sm-3">
                                    <button type="submit" w5c-form-submit="save()" class="btn btn-primary btn-sm" btn-loading="psdisabled" loading-text="保存中..." ng-disabled="psdisabled">
                                        <i class="fa fa-save"></i> 保存
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="panel panel-default">
                    <div class="panel-heading">商户认证信息</div>
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-4 control-label">姓名：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">{{model.name}}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-4 control-label">手机账户：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">{{model.mobile}}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-4 control-label">国家/地区：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">{{model.country}}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-4 control-label">企业类型：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">{{get_company_type(model.company_type)}}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-4 control-label">企业名称：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">{{model.company_name}}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-4 control-label">入驻时间：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">{{model.create_time}}</p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-4 control-label">营业执照：</label>
                            <div class="col-sm-8">
                                <p class="form-control-static">
                                    <a target="_blank" href="{{site.img_url+model.license}}"><img ng-src="{{model.license|thumbnail:300:250:site.img_url}}" /></a>
                                </p>
                                <p class="form-control-static">
                                    <a target="_blank" href="{{site.img_url+model.license1}}"><img ng-src="{{model.license1|thumbnail:300:250:site.img_url}}" /></a>
                                </p>
                                <p class="form-control-static">
                                    <a target="_blank" href="{{site.img_url+model.license2}}"><img ng-src="{{model.license2|thumbnail:300:250:site.img_url}}" /></a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
